<?php
session_start();

if(!$_SESSION['username'] || !$_SESSION['vyska'] || !$_SESSION['vaha'] || !$_SESSION['beer_count'])
{
    header("Location: index.php");
}
if($_POST)
{
    header("Location: krok4.php");
}

?>
<!DOCTYPE html>
<html>
<head>
<title>Úkol 8</title>
<meta charset="utf-8">
<style>
    body 
    {
        background: #0D48A7;
        font-family: Georgia, Times, serif;
        color: white;
    } 
    #body
    {
        background: #4079D3;
        min-width: 500px;
        width: 70%;
        position: relative;
        margin: 0px auto;
        text-align: center;
    }
    #header
    {
        background: #042D6D;
    }
    #footer
    {
        background: #042D6D;
    }
    table 
    {
        
        margin: 10px auto;
    }
    #menu a
    {
        color: white;
        margin-left: 2em
    }
    #content a
    {
        color: white;
        margin-left: 2em
    } 
</style>
</head>
<body>
    <div id="body">
        <div id="header">
            <h1>WIZZARD</h1>    
        </div>
        <div id ="menu">
            <?php require 'menu.php'; ?>
        </div>
        <div id="content">
        	<h2>Potvrzení údajů</h2>
        	<form method="post">
                    <table>
                        <tr>
                            <td>Jméno</td>
                            <td><?php echo $_SESSION['username']; ?></td>
                            <td><a href="krok1.php">Upravit</a></td>
                        </tr>
                        <tr>
                            <td>Výška</td>
                            <td><?php echo $_SESSION['vyska']; ?></td>
                            <td><a href="krok2.php">Upravit</a></td>
                        </tr>
                        <tr>
                            <td>Váha</td>
                            <td><?php echo $_SESSION['vaha']; ?></td>
                            <td><a href="krok2.php">Upravit</a></td>
                        </tr>
                        <tr>
                            <td>Počet piv</td>
                            <td><?php echo $_SESSION['beer_count']; ?></td>
                        </tr>
                        <tr>
                            <td colspan="3"><input type="submit" name="submit" value="Potvrdit"></td>
                        </tr>
                    </table>
                </form>
        </div>
        <div id="footer">
            <p>&not;&copy;&sup2; Petr Panoška</p>
        </div>
    </div>
</body>
</html>
